package com.onlinelibrary.mapper;

import com.onlinelibrary.pojo.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BookMapper {
    @Select("select * from book where state=1")
    List<Book> list();

    Book getBook(Book book);

    Integer addBook(Book book);

    Integer updateBook(Book book);

    Integer getBookCount(Book book);

    List<Book> getTableData(Book book);

    Integer deleteBook(Book book);


    List<Book> getBooksByBookName(Book book);
}
